package models;

import play.data.validation.Required;
import play.db.jpa.Model;

import javax.persistence.Column;
import javax.persistence.Entity;

@Entity
public class RoleFMPA extends Model{
	
	@Required
	@Column(unique=true)
	public String id_rolefmpa;
	
	@Required
	public String nom;
	
	public RoleFMPA(String nom){
		this.nom=nom;
	}
	
	public void setNom(String nom) {
		this.nom = nom;
	}


	public String getNom() {
		return nom;
	}
	
	public String toString(){
		return this.nom;
	}
	
	public boolean equals(Role r){
		return r.getNom()==(this.getNom());
	}
}
